
var loginToken = null;

(function($, owner) {


	owner.create_message = function(message){
		owner.get_local_state();
		var url = MESSAGE_API +'/create.do';
		message.loginToken = loginToken;
		return requestService.httpPost(url,message);
	}
	
	owner.get_local_state = function() {
		var state = JSON.parse(localStorage.getItem('$state'));
		if(state != null) {
			loginToken = state.loginToken;
		}
	}

}(mui, window.messageService = {}));